<script setup>
import { MySymbol } from '@/utils/symbols';

const { proxy } = getCurrentInstance()
const sendMsg = () => {
  console.log('sendMsg=======')
  proxy.$eventBus.emit('custom-event', { message: 'Hello from ComponentA' })
}

// setTimeout(() => {
//   sendMsg()
// }, 1000)

// 提供的数据
const myData = {
  message: 'Hello from provide!',
  count: 42
};

provide(MySymbol, myData);
</script>

<template>
  <router-view></router-view>
</template>

<style lang="scss">
html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  vertical-align: baseline;
}

// 引入思源黑体 CN Regular字体
@font-face {
  font-family: SourceHanSansCN-Regular, SourceHanSansCN;
  src: url('@/assets/font/SourceHanSansCN-Regular.otf');
}
@font-face {
  font-family: '庞门正道标题体3.0';
  src: url('@/assets/font/庞门正道标题体3.0.ttf');
}

@font-face {
  font-family: Oswald-Bold;
  src: url('@/assets/font/Oswald-Bold.otf');
}

@font-face {
  font-family: Oswald-Regular;
  src: url('@/assets/font/Oswald-Regular.ttf');
}

@font-face {
  font-family: Alibaba-PuHuiTi-Regular;
  src: url('@/assets/font/AlibabaPuHuiTi-2-55-Regular.ttf');
}
@font-face {
  font-family: DS-Digital Bold;
  src: url('@/assets/font/DS-Digital Bold.ttf');
}
@font-face {
  font-family: YouSheBiaoTiHei-2;
  src: url('@/assets/font/YouSheBiaoTiHei-2.ttf');
}

/* 自定义滚动条 */
::-webkit-scrollbar {
  width: 16px;
  background: transparent;
}

::-webkit-scrollbar-track {
  background-color: transparent;
}

::-webkit-scrollbar-thumb {
  background-color: rgba(108, 188, 218, 0.3);
  border-radius: 13px;
  border: 6px solid transparent;
  background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
  background-color: rgba(255, 255, 255, 0.6);
}

html {
  font-family: 'Helvetica Neue', Helvetica, Tahoma, Arial, 'PingFang SC', 'Source Han Sans CN',
    'Source Han Sans', 'Source Han Serif', 'Hiragino Sans GB', 'WenQuanYi Micro Hei',
    'Microsoft YaHei', sans-serif !important;
}

div {
  display: block;
  white-space: nowrap;
}

button {
  pointer-events: all;
  user-select: none;
  cursor: pointer;
  background-color: transparent;

  /* 取消默认边框 */
  border: none;

  /* 取消点击状态 */
  outline: none;
}

.actions > button,
button.action {
  cursor: pointer;
  background-color: transparent;
  border: 1px solid #909aa4;
  padding: 2px 8px;
  margin-right: 8px;
  color: #fff;
  &:last-child {
    margin-right: 0;
  }
}

button.confirm {
  box-shadow: inset 0px 0px 8px 0px #3fe1ff;
  border: 1px solid #83d8ff;
  color: #83d8ff;
}

button.cancel {
  border: 1px solid #fff;
  color: #fff;
}

.text-ellipsis {
  overflow: hidden;
  white-space: nowrap; /* 防止文字换行 */
  text-overflow: ellipsis; /* 文字超出显示省略号 */
}
</style>
